package com.mydubbo.demo;

import com.mydubbo.core.MyDubboReferStarter;
import com.mydubbo.proxy.JdkProxyFactory;

public class MainClient {
	
	public static void main(String[] args) throws InterruptedException {
		
		MyDubboReferStarter starter = MyDubboReferStarter.getInstance();
		starter.setProxyFactory(new JdkProxyFactory());
		starter.addBeanRefer(UserService.class);
		starter.start();
		
		Object proxy = starter.getProxy(UserService.class);
		UserService userService = (UserService) proxy;
		userService.hello("zhangsan");
//		for(int i=0;i<5;i++) {
//			System.out.println(userService.random(10));
//		}
	}

}
